package org.mall.modules.pay.convert;

import org.mall.modules.pay.dataobject.PayTransactionDO;
import org.mall.modules.pay.dataobject.PayTransactionExtensionDO;
import org.mall.modules.pojo.pay.transaction.PayTransactionBO;
import org.mall.modules.pojo.pay.transaction.PayTransactionCreateDTO;
import org.mall.modules.pojo.pay.transaction.PayTransactionSubmitDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface PayTransactionConvert {

    PayTransactionConvert INSTANCE = Mappers.getMapper(PayTransactionConvert.class);

    @Mappings({})
    PayTransactionDO convert(PayTransactionCreateDTO payTransactionCreateDTO);

    @Mappings({})
    PayTransactionBO convert(PayTransactionDO payTransactionDO);

    @Mappings({})
    List<PayTransactionBO> convertList(List<PayTransactionDO> list);

    @Mappings({})
    PayTransactionExtensionDO convert(PayTransactionSubmitDTO payTransactionSubmitDTO);

}
